package com.xingkeduo.remote.feign;

import com.xingkeduo.dto.ResponseMessage;
import com.xingkeduo.dto.StockSmallProgramVo;
import com.xingkeduo.dto.StockVo;
import com.xingkeduo.dto.StockWorkTimeVo;
import com.xingkeduo.utils.ResponseUtils;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(value = "business-workpad")
public interface WordPadFeignService {


    /**
     * 获取库存id
     * @param staffId
     * @param storeId
     * @param startTime
     * @param selectDate
     * @return
     */
    @RequestMapping("/staff/stock/getStockIdByStaffIdAndStoreId")
    ResponseMessage getStockIdByStaffIdAndStoreId(@RequestParam(value = "staffId") Long staffId, @RequestParam(value = "storeId") Long storeId, @RequestParam(value = "startTime") String startTime, @RequestParam(value = "selectDate") String selectDate);


    /**
    * @description: 获取双库存
    * @author: ch
    * @Param [staffId, storeId, startTime, selectDate]
    * @return com.xingkeduo.utils.ResponseUtils<java.util.List<com.xingkeduo.dto.StockSmallProgramVo>>
    * @date: 2019-07-12 14:37
    **/
    @RequestMapping("/staff/stock/getStockIdByStaffIdAndBaberStoreId")
    ResponseUtils<List<StockSmallProgramVo>> getStockIdByStaffIdAndBaberStoreId(@RequestParam(value = "staffId") Long staffId, @RequestParam(value = "storeId") Long storeId, @RequestParam(value = "startTime") String startTime, @RequestParam(value = "selectDate") String selectDate);


    @GetMapping("/staff/stock/getStaffStock")
    ResponseUtils<Map<String, StockVo>> getStaffStock(@RequestParam(value = "staffId") Long staffId, @RequestParam(value = "storeId") Long storeId, @RequestParam(value = "startTime")  String starDate);



    @GetMapping("/staff/stock/getMinFreeStockByStoreId")
    ResponseUtils<List<StockWorkTimeVo>> getMinFreeStockByStoreId(@RequestParam(value = "storeId") Long storeId);


    @GetMapping("/staff/stock/getLineNum")
    ResponseMessage getLineNum(@RequestParam(value = "dateTime") String dateTime, @RequestParam(value = "staffId") String staffId, @RequestParam(value = "storeId")  String storeId);


}
